/* Resource Detail Page - Optimized for 16:9 Pad 1920x1080 */
.resource-detail {
  min-height: 100vh;
  background: #0f172a;
  color: #f8fafc;
}

/* Header Styles */
.detail-header {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  border-bottom: 2px solid #334155;
  padding: 1.5rem 0;
}

.header-content {
  max-width: 1800px;
  margin: 0 auto;
  padding: 0 3rem;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  background: #334155;
  border: 2px solid #475569;
  border-radius: 0.75rem;
  color: #94a3b8;
  padding: 0.875rem 1.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
}

.back-btn.icon-only {
  padding: 0.875rem;
  border-radius: 0.75rem;
}

.back-btn:hover {
  background: #475569;
  color: #f8fafc;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.back-btn.primary {
  background: #667eea;
  border-color: #667eea;
  color: white;
}

.back-btn.primary:hover {
  background: #5a67d8;
  border-color: #5a67d8;
}

.resource-title-section {
  margin-bottom: 1.5rem;
}

.title-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1rem;
}

.resource-title {
  font-size: 2.25rem;
  font-weight: 700;
  color: #f8fafc;
  margin: 0;
  flex: 1;
  line-height: 1.2;
}

.resource-format-badge {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  background: #667eea;
  color: white;
  padding: 0.75rem 1.25rem;
  border-radius: 0.75rem;
  font-size: 1.0625rem;
  font-weight: 600;
}

.resource-description {
  font-size: 1.25rem;
  color: #cbd5e1;
  line-height: 1.6;
  margin: 0;
}

.header-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  background: #334155;
  border: 2px solid #475569;
  border-radius: 0.75rem;
  color: #94a3b8;
  padding: 0.875rem 1.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
}

.action-btn:hover {
  background: #475569;
  color: #f8fafc;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.action-btn.primary {
  background: #667eea;
  border-color: #667eea;
  color: white;
}

.action-btn.primary:hover {
  background: #5a67d8;
  border-color: #5a67d8;
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.action-btn.danger {
  background: #dc2626;
  border-color: #dc2626;
  color: white;
}

.action-btn.danger:hover {
  background: #b91c1c;
  border-color: #b91c1c;
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.4);
}

/* Content Styles */
.detail-content {
  max-width: 1600px;
  margin: 0 auto;
  padding: 2rem 3rem;
}

.content-main {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Preview Section */
.preview-section {
  background: #1e293b;
  border: 2px solid #334155;
  border-radius: 1.25rem;
  overflow: hidden;
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 2px solid #334155;
  background: #334155;
}

.preview-header h3 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: #f8fafc;
}

.preview-actions {
  display: flex;
  gap: 0.875rem;
}

.preview-btn {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  background: #475569;
  border: 2px solid #64748b;
  border-radius: 0.625rem;
  color: #e2e8f0;
  padding: 0.625rem 1.125rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1rem;
  font-weight: 500;
}

.preview-btn:hover {
  background: #64748b;
  color: #f8fafc;
  transform: translateY(-1px);
}

.preview-content {
  padding: 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 500px;
  background: #0f172a;
}

.preview-image {
  max-width: 100%;
  max-height: 600px;
  border-radius: 1rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* Info and Content Combined Section */
.info-content-section {
  background: #1e293b;
  border: 2px solid #334155;
  border-radius: 1.25rem;
  padding: 1.5rem 2rem;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem 2rem;
  margin-bottom: 1.5rem;
}

.content-divider {
  height: 2px;
  background: linear-gradient(to right, transparent, #334155 20%, #334155 80%, transparent);
  margin: 1.5rem 0;
}

.content-text {
  color: #cbd5e1;
  line-height: 1.7;
  font-size: 1.125rem;
}

.content-text p {
  margin: 0 0 1rem 0;
}

.content-text p:last-child {
  margin-bottom: 0;
}



/* Info Item Styles */
.info-item {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.info-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #94a3b8;
  font-size: 0.875rem;
  font-weight: 500;
}

.info-label svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.info-value {
  color: #f8fafc;
  font-weight: 600;
  font-size: 1rem;
  padding-left: 1.5rem;
}



/* Loading States */
.loading-skeleton {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.skeleton-line {
  background: linear-gradient(90deg, #334155 25%, #475569 50%, #334155 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: 4px;
}

.skeleton-title {
  height: 2rem;
  width: 60%;
}

.skeleton-subtitle {
  height: 1.25rem;
  width: 40%;
}

.skeleton-content {
  height: 1rem;
  width: 100%;
}

.skeleton-content:nth-child(2) {
  width: 80%;
}

.skeleton-content:nth-child(3) {
  width: 60%;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Not Found State */
.not-found {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2rem;
  color: #94a3b8;
}

.not-found svg {
  color: #64748b;
  margin-bottom: 1.5rem;
}

.not-found h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: #f8fafc;
}

.not-found p {
  margin: 0 0 2rem 0;
  font-size: 1rem;
  color: #94a3b8;
}

/* Responsive Design - Optimized for 16:9 Pad */
@media (min-width: 1280px) {
  .info-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 1279px) {
  .header-content {
    padding: 0 2rem;
  }

  .detail-content {
    padding: 2rem;
  }

  .info-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .detail-header {
    padding: 1.25rem 0;
  }

  .header-content {
    padding: 0 1.5rem;
  }

  .detail-content {
    padding: 1.5rem;
  }

  .title-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.875rem;
  }

  .resource-title {
    font-size: 1.75rem;
  }

  .resource-description {
    font-size: 1.0625rem;
  }

  .header-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .action-btn {
    justify-content: center;
  }

  .preview-content {
    padding: 1.5rem;
    min-height: 350px;
  }

  .preview-image {
    max-height: 400px;
  }

  .info-content-section {
    padding: 1.25rem 1.5rem;
  }

  .info-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem 1.5rem;
  }
}

@media (max-width: 480px) {
  .header-actions {
    gap: 0.875rem;
  }

  .action-btn {
    padding: 0.75rem 1.25rem;
    font-size: 0.9375rem;
  }

  .preview-header {
    padding: 1rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .preview-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .resource-title {
    font-size: 1.5rem;
  }

  .info-grid {
    grid-template-columns: 1fr;
    gap: 0.875rem;
  }

  .content-divider {
    margin: 1.25rem 0;
  }

  .info-content-section {
    padding: 1rem 1.25rem;
  }
}
